import Vue from 'vue'
import Vuex from 'vuex'
import app from './modules/app'
import getters from './getters'

Vue.use(Vuex)
const state = {
  activityList: [], //活动列表
  thisActivityId: '', //当前展示的活动ID
  // 票务统计
  ticketCount: "", //票务统计-票种统计接口
  lineChartData: { //票务统计-票种统计图表
    xName: [],
    barData: [],
    showName: [],
    total: 0
  },
  showTicketCountChart: false, //展示票务统计-票种统计图表
  pageLoading: false, //页面组件加载动画

  shareList: [], //票务统计-渠道统计接口
  lineChartDataShareList: {
    xName: [],
    barData: [],
    showName: [],
    total: 0
  },
  showShareListChart: false, //展示票务统计-渠道统计图表


  // 人员统计
  singnList: [], //报名人数
  lineChartDataSingn: {}, //图表数据
  showSingnChart: false, //展示表格
  singnTime: {
    stratDate: null,
    endDate: null
  },






  popTablist: [], //人员统计表格数据
  popTablistChart: { //人员统计表格图表数据
    xName: [],
    barData: [],
    showName: [],
    total: 0
  }, //表格图表
  showPopTablistChart: false, //展示人员


  // 活动统计
  aggregateDataList: [], //汇总数据
  aggregateDataInfo: {}, // 到场数据展示
  aggregateTime: {
    startDate: null
  },
  lineChartDataAggregate: {
    barData: []
  }, // 图表数据
  showlineChartDataAggregate: false,

  speciesList: [], //票种分析
  speciesTime: {
    startDate: null
  },
  lineChartDataSpeciesList: {
    barData: []
  }, // 图表数据
  showSpeciesList: false,


  channelList: [], //渠道分析
  channelListTime: {
    startDate: null
  },
  lineChartDataChannelList: {
    barData: []
  }, // 图表数据
  showChannelList: false,

}

const store = new Vuex.Store({
  state,
  modules: {
    app
  },
  getters
})

export default store
